home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / pvm34b3.zip / pvm34b3 / pvm3 / src / lpvm.h < prev    next >
C/C++ Source or Header  |  1997-07-22  |  6KB  |  189 lines

  1.  
  2. /* $Id: lpvm.h,v 1.9 1997/06/27 19:53:55 pvmsrc Exp $ */
  3.  
  4. /*
  5.  *         PVM version 3.4:  Parallel Virtual Machine System
  6.  *               University of Tennessee, Knoxville TN.
  7.  *           Oak Ridge National Laboratory, Oak Ridge TN.
  8.  *                   Emory University, Atlanta GA.
  9.  *      Authors:  J. J. Dongarra, G. E. Fagg, M. Fischer
  10.  *          G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci,
  11.  *         P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam
  12.  *                   (C) 1997 All Rights Reserved
  13.  *
  14.  *                              NOTICE
  15.  *
  16.  * Permission to use, copy, modify, and distribute this software and
  17.  * its documentation for any purpose and without fee is hereby granted
  18.  * provided that the above copyright notice appear in all copies and
  19.  * that both the copyright notice and this permission notice appear in
  20.  * supporting documentation.
  21.  *
  22.  * Neither the Institutions (Emory University, Oak Ridge National
  23.  * Laboratory, and University of Tennessee) nor the Authors make any
  24.  * representations about the suitability of this software for any
  25.  * purpose.  This software is provided ``as is'' without express or
  26.  * implied warranty.
  27.  *
  28.  * PVM version 3 was funded in part by the U.S. Department of Energy,
  29.  * the National Science Foundation and the State of Tennessee.
  30.  */
  31.  
  32. /*
  33.  *    lpvm.h
  34.  *
  35.  *    Libpvm Globals Declarations.
  36.  *
  37. $Log: lpvm.h,v $
  38.  * Revision 1.9  1997/06/27  19:53:55  pvmsrc
  39.  * Fixed polltype/polltime bug in AIX4MP.
  40.  *
  41.  * Revision 1.8  1997/06/27  17:32:22  pvmsrc
  42.  * Updated for WIN32 header files & Authors.
  43.  *
  44.  * Revision 1.7  1997/05/07  21:23:28  pvmsrc
  45.  * Added new pvmupkstralloc() for dynamic string unpacking lunacy.
  46.  *     - with proto in header.
  47.  *
  48.  * Revision 1.6  1997/03/17  20:56:34  pvmsrc
  49.  * include sys/types.h for SUNOS in.h problem.
  50.  *
  51.  * Revision 1.5  1997/03/06  21:06:58  pvmsrc
  52.  *         define struct ttpcb and TT states
  53.  *         added includes for this struct defn
  54.  *
  55.  * Revision 1.4  1997/02/13  23:35:42  pvmsrc
  56.  * Added new PvmNoReset setopt/getopt option.
  57.  *     - added new pvmnoreset, pvmnoresetindex globals in lpvm.[ch].
  58.  *     - to set use pvm_putinfo() -> PVMNORESETCLASS first avail w/lock,
  59.  *         save index in pvmnoresetindex.
  60.  *     - to unset use pvm_delinfo().
  61.  *
  62.  * Revision 1.3  1997/01/28  19:27:58  pvmsrc
  63.  * New Copyright Notice & Authors.
  64.  *
  65.  * Revision 1.2  1996/12/18  22:28:54  pvmsrc
  66.  * Added new FILE *logfp decl.
  67.  *     - only #ifdef LOG.  (previously only in shmem stuff)
  68.  *     - needed for now shared pvmlogerror() routine.
  69.  *
  70.  * Revision 1.1  1996/10/24  19:44:17  pvmsrc
  71.  * Initial revision
  72.  *
  73.  *
  74.  */
  75.  
  76.  
  77. #include <sys/types.h>
  78. #ifndef WIN32
  79. #include <netinet/in.h>
  80. #include <netinet/tcp.h>
  81. #endif
  82.  
  83. #ifdef IMA_MPP
  84. #include "mppchunk.h"
  85. #endif
  86. extern    int pvmautoerr;                /* whether to auto print err msgs */
  87.  
  88. extern    struct Pvmtracer pvmctrc;    /* child tracer info */
  89. extern    struct Pvmtracer pvmtrc;    /* task tracer info */
  90.  
  91. extern    int pvmmyptid;                /* parent task id */
  92. extern    int pvmmytid;                /* this task id */
  93. extern    int pvmmyupid;                /* process unix pid */
  94. extern    int pvm_useruid;            /* user's unix uid */
  95. extern    int pvmmydsig;                /* native data enc, init XDR */
  96. extern    int pvmschedtid;            /* scheduler task */
  97. extern    int pvmrescode;                /* allow reserved tids, tags */
  98. extern    int pvmshowtaskid;            /* catchout shows task ids */
  99. extern    int pvmtoplvl;                /* funct called from outside lib */
  100. extern    int pvmdebmask;                /* which debugging info */
  101. extern    int pvmrouteopt;            /* task-task routing style */
  102. extern    int pvmnoreset;                /* task reset override */
  103. extern    int pvmnoresetindex;        /* task reset override mb index */
  104.  
  105. extern    int pvmfrgsiz;                /* message frag length (to pack) */
  106. extern    int pvmudpmtu;                /* local UDP MTU */
  107.  
  108. extern    int pvmmyctx;                /* current message context */
  109. extern    int pvmnsibs;                /* number in our spawn group */
  110. extern    int *pvmsibtids;            /* tids in our spawn group */
  111.  
  112. extern    struct pmsg *pvmrxlist;        /* not-recvd msg list */
  113.  
  114. extern    struct pmsg *pvmrbuf;        /* current recv/unpack message */
  115. extern    struct pmsg *pvmsbuf;        /* current send/pack message */
  116.  
  117.  
  118. #if defined(IMA_ALPHAMP) || defined(IMA_CSPP) || defined(IMA_HPPAMP) \
  119.     || defined(IMA_RS6KMP) || defined(IMA_SGIMP) \
  120.     || defined(IMA_AIX4MP) || defined(IMA_SGIMP64) || defined(IMA_SUNMP)
  121. extern     int pvmpolltype;            /* memory polling style */
  122. extern     int pvmpolltime;            /* time value for poll wait */
  123. #endif
  124.  
  125. #ifdef LOG
  126. extern    FILE *logfp;                /* my own log file */
  127. #endif
  128.  
  129.  
  130. /* Trace Globals Declarations */
  131.  
  132. extern    struct pvmtrcencvec *pvmtrccodef;
  133.  
  134. extern    struct timeval pvmtrcztv;
  135.  
  136. extern    struct pmsg *pvmtrcmp;
  137.  
  138. extern    int pvmtrcsbfsave;
  139. extern    int pvmtrcsbf;
  140.  
  141. extern    int pvmtrcdesc;
  142. extern    int pvmtrctmp;
  143.  
  144. extern    int pvmtrcsavekind;
  145.  
  146.  
  147. /* Routines */
  148.  
  149. int    pvm_tc_noop                __ProtoGlarp__(( int ));
  150. int    pvm_tc_settrace            __ProtoGlarp__(( int ));
  151. int    pvm_tc_settrcbuf        __ProtoGlarp__(( int ));
  152. int    pvm_tc_settrcopt        __ProtoGlarp__(( int ));
  153. int    pvm_tc_settmask            __ProtoGlarp__(( int ));
  154. int    pvm_tc_siblings            __ProtoGlarp__(( int ));
  155.  
  156. int pvmupkstralloc            __ProtoGlarp__(( char ** ));
  157.  
  158.  
  159. /*
  160. *   task-task or task-pvmd control block
  161. */
  162.  
  163. struct ttpcb {
  164.     struct ttpcb *tt_link;          /* dll of peers */
  165.     struct ttpcb *tt_rlink;
  166.     int tt_tid;                     /* tid of peer or 0 if master of list */
  167.     int tt_state;
  168.     int tt_fd;                      /* fd of connection or -1 */
  169.     struct sockaddr_in tt_sad;      /* address of our socket */
  170.     struct sockaddr_in tt_osad;     /* (authd) address of peer socket */
  171.     struct pmsg *tt_rxfrag;         /* not-assembled incm msg */
  172.     struct frag *tt_rxf;            /* partial incm frag */
  173. #ifndef NOUNIXDOM
  174.     char *tt_spath;                 /* socket path */
  175. #endif
  176. #if defined(IMA_MPP)            /* ordering structure for send/recv msgs */
  177.     MPP_DIRECTI_PTR    mpdirect;
  178. #endif    
  179. };
  180.  
  181. /* ttpcb states */
  182. #define TTCONWAIT   1           /* requested, waiting for reply to connect */
  183. #define TTGRNWAIT   2           /* granted, waiting for connect */
  184. #define TTOPEN      3           /* connection running */
  185. #define TTDENY      4           /* don't attempt connection */
  186. #define TTDEAD      5           /* task dead; pcb should be cleared */
  187.  
  188.  
  189.